#include <iostream>
#include <stack>
using namespace std;
template<class ElemType>
bool parlindrome_judge(stack<ElemType>& S)
{
	stack<ElemType> s;
	while (S.top() != '&') {
		s.push(S.top());
		S.pop();
	}	S.pop();
	if (s.size() != S.size())
		return false;
	while (s.size()) {
		if (s.top() != S.top()) {
			return false;
		}
		s.pop(); S.pop();
	}
	return true;
}
int main()
{
	stack<char> s;
	while (true) {
		char c; cin >> c;
		if (c == '@') break;
		s.push(c);
	}
	if (parlindrome_judge(s)) {
		cout << "true";
	}
	else {
		cout << "false";
	}
	return 0;
}